package cii_lib_graph;
import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import resources.Rule;
import resources.TFCCRender;

import componentEnhancement.PanelMaker;

import java.awt.Component;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import testy.TestHardware;
import cii_lib.CCII_TABLE_INDEX;
import cii_opto.CCII_IDENTIFICATOR;
import cii_opto.CCII_PART_DATA_SENDER;
import cii_opto.CII_OPTO_cfg_tab;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NewJFrame extends javax.swing.JFrame {
	private GAccessPanel gAccessPanel1;
	private JScrollPane jScrollPane1;
	private JTable jTable2;
	private JButton jButton1;
	private JLabel jLabel2;
	private JPanel jPanel10;
	private JButton writeButton;
	private JPanel jPanel4;
	private JButton readButton;
	private JScrollPane jScrollPane3;
	private JLabel jLabel1;
	private JPanel jCompPanel;
	private JTable jTable1;
	private JScrollPane jScrollPane2;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		NewJFrame inst = new NewJFrame();
		inst.setVisible(true);
	}
	
	public NewJFrame() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		JTextField jTextFieldCharInt;
		JTable jTableInt;
		try {
			CCII_TABLE_INDEX tm = new CCII_TABLE_INDEX(CII_OPTO_cfg_tab.ITAB.getItems(),51);
//			CCII_TABLE_INDEX ti = new CCII_TABLE_INDEX(tm,index);
			TestHardware th = new TestHardware();
//			CCII_IDENTIFICATOR cid = new CCII_IDENTIFICATOR(tm,1,th,null);
			CCII_TABLE_INDEX tmSend = new CCII_TABLE_INDEX(CII_OPTO_cfg_tab.ITAB.getItems(),105);
			CCII_PART_DATA_SENDER send = new CCII_PART_DATA_SENDER(tmSend,4,th,null);
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jCompPanel = new JPanel();
				getContentPane().add(jCompPanel);
				jCompPanel.setBounds(42, 49, 609, 385);
				jCompPanel.setLayout(null);
				jCompPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0,0,0)), "CompName", TitledBorder.LEADING, TitledBorder.TOP));
				{
					jScrollPane2 = new JScrollPane();
					jCompPanel.add(jScrollPane2);
					jScrollPane2.setBounds(28, 21, 273, 175);
					{
						jTable2 = send.getTables()[1];
						jScrollPane2.setViewportView(jTable2);
					}
				}
				{
					jScrollPane1 = new JScrollPane();
					jCompPanel.add(jScrollPane1);
					jScrollPane1.setBounds(28, 203, 273, 168);
					{
						jTable1 = send.getTables()[0];
						jScrollPane1.setViewportView(jTable1);
					}
				}
				{
					jLabel1 = new JLabel();
					jCompPanel.add(jLabel1);
					jLabel1.setText("I:"); 
					jLabel1.setBounds(7, 21, 14, 28);
				}
				{
					jLabel2 = new JLabel();
					jCompPanel.add(jLabel2);
					jLabel2.setText("P:");
					jLabel2.setBounds(7, 203, 14, 28);
				}
				{
					readButton = new JButton();
					jCompPanel.add(readButton);
					readButton.setText("Read");
					readButton.setBounds(385, 350, 63, 21);
					readButton.setFont(new java.awt.Font("Tahoma",0,10));
					readButton.setBackground(new java.awt.Color(191,234,192));
					readButton.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
								.println("readButton.actionPerformed, event="
									+ evt);
							//TODO add your code for readButton.actionPerformed
						}
					});
				}
				{
					writeButton = new JButton();
					jCompPanel.add(writeButton);
					writeButton.setText("Write");
					writeButton.setBounds(455, 350, 63, 21);
					writeButton.setFont(new java.awt.Font("Tahoma",0,10));
					writeButton.setBackground(new java.awt.Color(255,201,147));
				}
				{
					jPanel10 = new GInterfaceTablePanel().getPanel();
					jCompPanel.add(jPanel10);
					jPanel10.setBounds(315, 21, 280, 357);
				}

			}
			PanelMaker pm = new PanelMaker();
			pm.setComponent(send);
//			cid.initPanel();
			{
				
				gAccessPanel1 = new GAccessPanel();
				getContentPane().add(gAccessPanel1);
				gAccessPanel1.setBounds(623, 7, 196, 91);
				gAccessPanel1.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
			}
			{
				jPanel4 = new JPanel();
				getContentPane().add(jPanel4);
				jPanel4.setBounds(700, 364, 98, 84);
				{
					jButton1 = new JButton();
					jPanel4.add(jButton1);
					jButton1.setText("jButton1");
				}
			}
			{
				
				send.initPanel();
			}
			pack();
			this.setSize(827, 519);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
